package securelogin.action;
import java.io.*;
public class LoginDataManipulation{
	private String username;
	private String password;
	

	private checkLogin(String username, String password)
	{
		try{
			FileReader rf = new FileReader("/home/elitecore/Rajan_5309/JSP, Servlet and tomcat/securelogin/src/org/utils/Data");
			BufferedReader reader = new BufferedReader(rf);
			String line = "";
			int i=0;
			boolean userflag=false;
			char ch[]= reader.read();
			String line = "";
			while ((line = reader.readLine()) != null) {
      				if(line.equals(username)){		
					
					if((reader.readline()).equals(password))
					{
						return true;
					}
					
				}
    			}
				
			
			return false;
		}catch (Exception e){
			  System.err.println("Error in Login file writing: " + e.getMessage());
		}
		finally{
			rf.close();
		}
		
		
	}
}
